﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using Grundy.Common;

namespace Grundy.Message
{
    
    [DataContract]
    public abstract class FloatingLicense : License
    {
        public override string Type { get { return "Floating License";} }

        
        [IgnoreDataMember]
        [Required]
        public string LicenseClientTypeValue { get; set; }

        [DataMember]
        public LicenseClientType Client
        {
            get { return LicenseClientType.Parse(LicenseClientTypeValue); }
            set { LicenseClientTypeValue = (value == null ? null : value.Name); }
        }
    }
}